using System;
using System.Windows.Forms;
using System.Drawing;

public class DGVComboBoxColumn : DataGridViewComboBoxColumn, IDGVColumn
{
    public DGVComboBoxColumn(object DataSource, string TableName, string ValueMember, string DisplayMember)
        : base()
    {
        this.DataSource = new BindingSource(DataSource, TableName);
        this.ValueMember = ValueMember;
        this.DisplayMember = DisplayMember;
        this.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing;
    }

    // IDGVColumn.EditingLabel()
    public Label EditingLabel()
    {
        return new DBLabel(this.HeaderText);
    }

    // IDGVColumn.EditingControl
    public Control EditingControl()
    {
        return new DBComboBox(this);
    }
}
